#include <Eigen/Core>

#include <cmath>
#include <autodiff/forward.hpp>
using namespace autodiff;

double question1(){
    // 计算函数 f = exp(x * x + sqrt(y) / log(x * y)) 对 x 的偏导数
    double x = 1.0;
    double y = 3.0;

    return 0.0;
}

dual f(dual x, dual y){
    return exp(x * x + sqrt(y) / log(x * y));
}

double golden1(){
    dual x = 1.0;
    dual y = 3.0;
    dual u = f(x,y);
    double dudx = derivative(f, wrt(x), at(x,y));
    return dudx;
}
